import request from '../utils/request.js';

export function getLoginCode(data) {
	return request.post('/staff/sendCaptcha', data);
}

export function loginMini(data) {
	return request.post('/staff/login', data);
}
export function getUserInfo(data) {
	return request.post('/user/getUserById', data);
}
export function bandCard(data) {
	return request.post('/staff/bindCard', data);
}
export function withDraw(data) {
	return request.post('/staff/applyCash', data);
}
export function getList(data) {
	return request.post('/staff/getCashRecord', data);
}
export function getCode(data) {
	return request.post('/openapi-service/createMinQrCode', data);
}
export function getUseList(data) {
	return request.post('/user/getConsumeList', data);
}
export function writeOff(data) {
	return request.post('/staff/writeOff', data);
}

// USER_AGREE  用户端用户协议
// USER_SECRET_POLICY 用户端用户隐私协议
// USER_PAY_POLICY 用户端用户支付协议
// USER_MEMBER_PLAN 用户端会员计划
// USER_PROTOCOL_PRIVACY_POLICY 用户端用户协议与隐私政策
// USER_EXCLUSIVE_WAITER 用户端专属客服
// USER_GUIDE_PAY_INFO 用户端引导购买信息
// STAFF_AGREE 员工端用户协议
// STAFF_SECRET_POLICY 员工端隐私协议
// HEADQUARTER_MOBILE 总部电话
// VIP_PRICE 会员价格
export function getConfig(data) {
	return request.post('/openapi-service/getConfig', data);
}
export function updateConfig(data) {
	return request.post('/openapi-service/modifyConfig', data);
}
export function adminLogin(data) {
	return request.post('/admin/login', data);
}
export function withDrawList(data) {
	return request.post('/staff/getCashRecord', data);
}
export function editUser(data) {
	return request.post('/admin/editUser', data);
}
export function uploadFile(data) {
	return request.post('/openapi-service/getAliOssUploadTicket', data);
}
export function getProfitView(data) {
	return request.post('/staff/getProfitView', data);
}
export function getProfitList(data) {
	return request.post('/staff/getProfitList', data);
}